<%--
  Created by IntelliJ IDEA.
  User: ytqint
  Date: 2018/11/12
  Time: 13:17
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <title>pvuv统计</title>
    <%@ include file="../common/meta.jsp" %>
    <%@ include file="../common/common-body.jsp" %>
    <link href="${ctx}/css/page/common-list.css?t=${now}" rel="stylesheet">
    <link href="${ctx}/css/page/common-search.css?t=${now}" rel="stylesheet">
    <script src="${ctx}/js/echarts/echarts.min.js"  type="text/javascript"></script>
    <script src="${ctx}/js/echarts/echarts-theme/macarons.js"  type="text/javascript"></script>
    <script src="${ctx}/js/common/myDateTimeFormat.js"  type="text/javascript"></script>
    <%--<script src="${ctx}/js/plugins/treeview/bootstraptable-treeview.js"></script>--%>
    <%--<script src="${ctx}/js/plugins/treeview/bootstrap-treeview.js"></script>--%>
    <style>
        .chartLine{
            float: left;
            width: 100%;
            height: 350px;
        }
        .my-ibox-content{
            height: 370px;
        }
        .my-border-none {
            border: none;
        }
        .my-border {
            border-top: 4px solid #e7eaec;
        }
        .noShow {
            display: none;
        }
        .badge {
            float: right!important;
        }
    </style>
    <script>
        var defStatEndTime = '${defStatEndTime}';
        var countType = '${countType}';
        var initEChartsLineData = ${initEChartsLineData};
        var countData = ${countData};
    </script>
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="tabs-container">
        <ul class="nav nav-tabs">
            <c:if test="${not empty searchInfo && searchInfo.isPvExist == 1}">
                <li <c:if test="${countType == 'pv'}"> class="active" </c:if>>
                    <a href="${ctx}/pvuv/pvuvStat/pvPage?isPvExist=${not empty searchInfo ? searchInfo.isPvExist : 1}&isUvExist=${not empty searchInfo ? searchInfo.isUvExist : 1}&isStatExist=${not empty searchInfo ? searchInfo.isStatExist : 1}" aria-expanded="true">PV统计</a>
                </li>
            </c:if>
            <c:if test="${not empty searchInfo && searchInfo.isUvExist == 1}">
                <li <c:if test="${countType == 'uv'}"> class="active" </c:if>>
                    <a href="${ctx}/pvuv/pvuvStat/uvPage?isPvExist=${not empty searchInfo ? searchInfo.isPvExist : 1}&isUvExist=${not empty searchInfo ? searchInfo.isUvExist : 1}&isStatExist=${not empty searchInfo ? searchInfo.isStatExist : 1}" aria-expanded="true">UV统计</a>
                </li>
            </c:if>
            <c:if test="${not empty searchInfo && searchInfo.isStatExist == 1}">
                <li class="">
                    <a href="${ctx}/pvuv/statSeedBiz/page?isPvExist=${not empty searchInfo ? searchInfo.isPvExist : 1}&isUvExist=${not empty searchInfo ? searchInfo.isUvExist : 1}&isStatExist=${not empty searchInfo ? searchInfo.isStatExist : 1}" aria-expanded="true">统计项控制</a>
                </li>
            </c:if>
        </ul>
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>筛选查询</h5>
                    </div>
                    <div class="ibox-content ibox-content-search">
                        <form class="form-horizontal m-t" id="searchForm" novalidate="novalidate">
                            <div class="form-group">
                                <label class="col-sm-1 control-label">统计日期：</label>
                                <div class="col-sm-2" style="padding-right:5px;">
                                    <input placeholder="统计日期" class="form-control layer-date" id="statEndTime" name="statEndTime" minlength="1" value="${defStatEndTime}">
                                </div>
                                <label class="col-sm-1 control-label">业务类型：</label>
                                <div class="col-sm-2">
                                    <select class="form-control" name="bizType" id="bizType" onchange="doRefresh()">
                                        <c:if test="${not empty bizTypeMap}">
                                            <c:forEach items="${bizTypeMap}" var="item">
                                                <option value="${item.code}"
                                                        <c:if test="${not empty searchInfo && searchInfo.bizType == item.code}"> checked </c:if>
                                                >${item.name}</option>
                                            </c:forEach>
                                        </c:if>
                                    </select>
                                </div>
                                <label class="col-sm-1 control-label">埋点类型：</label>
                                <div class="col-sm-2">
                                    <select class="form-control" name="seedType" id="seedType" onchange="doRefresh()">
                                        <c:forEach items="${seedTypeMap}" var="item">
                                            <option value="${item.code}"
                                                    <c:if test="${not empty searchInfo && searchInfo.seedType == item.code}"> checked </c:if>
                                            >${item.name}</option>
                                        </c:forEach>
                                    </select>
                                </div>
                                <label class="col-sm-1 control-label">输出平台：</label>
                                <div class="col-sm-2">
                                    <select class="form-control" name="source" id="source" onchange="doRefresh()">
                                        <c:forEach items="${sourceMap}" var="item">
                                            <option value="${item.code}"
                                                    <c:if test="${not empty searchInfo && searchInfo.source == item.code}"> checked </c:if>
                                            >${item.name}</option>
                                        </c:forEach>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="ibox-tools ibox-tools-search">
                                    <button type="button" class="btn btn-primary btn-outline" onclick="doRefresh()">查询</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-4" style="padding-right: 0px;">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>统计项</h5>
                    </div>
                    <div class="ibox-content">
                        <table id="dataTable" style="width: 100%"></table>
                    </div>
                </div>
            </div>
            <div class="col-sm-8">
                <div class="ibox float-e-margins">
                    <div class="ibox-content my-ibox-content my-border">
                        <div id="chartLine" class="chartLine"></div>
                    </div>
                    <div class="ibox-content my-ibox-content my-border-none noShow" id="_pieDiv">
                        <div id="chartPie" class="chartLine"></div>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-12">
                <div class="text-center">${companyName}</div>
            </div>
        </div>
    </div>
</div>

<script src="${ctx}/js/stat/pvuvMgr.js?t=${now}"></script>
</body>
</html>